import java.util.Random;
import java.util.Scanner;

public class Caishu {
    public static void main(String[] args) {
        Random random = new Random();
        int num = random.nextInt(100);

        Scanner scan = new Scanner(System.in);
        while(true){
            System.out.println("请输入你要猜的数字：");
            int i = scan.nextInt();
            if(i == num){
                System.out.println("猜中了！");
                break;
            }
            else if(i > num){
                System.out.println("猜大了");
            }
            else{
                System.out.println("猜小了");
            }
        }
    }
}
